package com.ala4.oxcafe.entity;

import com.ala4.oxcafe.core.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

/**
 * 测试用户菜单对象 test_user_info
 *
 * @author PING
 * @date 2025-03-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("test_user_info")
@Schema(description = "测试用户菜单实体")
public class TestUserInfo extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(title = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(title = "名称")
    @TableField("user_name")
    private String userName;

    @Schema(title = "年龄")
    @TableField("user_age")
    @NotEmpty(message = "年龄不能为空")
    @NotNull(message = "年龄不能为空")
    private String userAge;

    @Schema(title = "用户性别")
    @TableField("user_sex")
    @NotNull(message = "用户性别不能为空")
    @NotNull(message = "用户性别不能为空")
    private String userSex;

    @TableLogic
    @Schema(title = "逻辑删除字段,是否删除0否1是")
    @TableField("del_flag")
    private Integer delFlag;

    @Version
    @Schema(title = "版本号")
    @TableField("version")
    private Long version;
}
